package org.dyndns.opendemogroup.optimizer.operations;

import org.junit.Test;

/**
 * A class to test the class LongestAlternatingSubsequenceCrossover
 */
public class LongestAlternatingSubsequenceCrossoverTest extends
		OperationTestBase
{

	public LongestAlternatingSubsequenceCrossoverTest ( )
	{
		super ( new LongestAlternatingSubsequenceCrossover ( ) );
	}

	/**
	 * Tests the <i>perform</i> method with a typical scenario.
	 */
	@Test
	public void perform_Typical ( )
	{
		double[] parentGenomeOne =
		{
			0, 0, 0, 1, 1, 1, 0, 1, 0, 1
		};
		double[] parentGenomeTwo =
		{
			0, 1, 1, 0, 1, 0, 1, 1, 1, 1
		};
		double[] expectedGenomeOne =
		{
			0, 1, 1, 0, 1, 1, 0, 1, 0, 1
		};
		double[] expectedGenomeTwo =
		{
			0, 0, 1, 0, 1, 0, 1, 1, 0, 1
		};

		checkPerform ( parentGenomeOne, parentGenomeTwo, null, null,
			expectedGenomeOne, expectedGenomeTwo );
	}

}
